package insight.google.game.era.data;

import insight.google.game.era.core.Util;

import java.io.Serializable;




import javax.jdo.annotations.IdGeneratorStrategy;

import javax.jdo.annotations.FetchGroup;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import org.directwebremoting.annotations.DataTransferObject;
import org.directwebremoting.annotations.RemoteProperty;

import com.google.appengine.api.datastore.Key;

@DataTransferObject
@PersistenceCapable(identityType = IdentityType.APPLICATION, detachable = "true")
@FetchGroup(name = "game_history", members = { @Persistent(name ="gameHistory")})
public class GameHistoryDetail{

	/**
	 * 
	 */

	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	@PrimaryKey
	private Key id;
	
//	@Persistent
//	private Key gameId;
	
//	@RemoteProperty
	@Persistent
	private Key userHistoryId;
	
	@RemoteProperty
	@Persistent
	private String roleName;

	@RemoteProperty
	@Persistent
	private int gameResultStatus=0;
	
	@RemoteProperty
	@Persistent
	private String characterName;
	
	@RemoteProperty
	@Persistent
	private int userStatus=0;
	
//	private UserHistoryJDO userHistory;
	
	@Persistent
	private GameHistory gameHistory;
	
	@RemoteProperty
	@Persistent
	private boolean isOwner;
	
//	@RemoteProperty
	@Persistent
	private Key userId;
	
	@RemoteProperty
	@Persistent
	private String userName;

	public Key getId() {
		return id;
	}

	public void setId(Key id) {
		this.id = id;
	}

//	public Key getGameId() {
//		return gameId;
//	}
//
//	public void setGameId(Key gameId) {
//		this.gameId = gameId;
//	}

	public Key getUserHistoryId() {
		return userHistoryId;
	}

	public void setUserHistoryId(Key userHistoryId) {
		this.userHistoryId = userHistoryId;
	}

	public String getRoleName() {
		return roleName;
	}

	public void setRoleName(String roleName) {
		this.roleName = roleName;
	}

	

	public String getCharacterName() {
		return characterName;
	}

	public void setCharacterName(String characterName) {
		this.characterName = characterName;
	}



	public GameHistory getGameHistory() {
		return gameHistory;
	}

	public void setGameHistory(GameHistory gameHistory) {
		this.gameHistory = gameHistory;
	}

	public int getUserStatus() {
		return userStatus;
	}

	public void setUserStatus(int userStatus) {
		this.userStatus = userStatus;
	}

	public int getGameResultStatus() {
		return gameResultStatus;
	}

	public void setGameResultStatus(int gameResultStatus) {
		this.gameResultStatus = gameResultStatus;
	}

	public boolean isOwner() {
		return isOwner;
	}

	public void setOwner(boolean isOwner) {
		this.isOwner = isOwner;
	}

	public Key getUserId() {
		return userId;
	}

	public void setUserId(Key userId) {
		this.userId = userId;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}
	
	
	
	
	
	
}
